# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Leonidas Spyropoulos <artafinde at gmail com>
# Contributor: Miguel Revilla <yo@miguelrevilla.com>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Mario J Steele <mario@ruby-im.net>

pkgname=dvdstyler
pkgver=3.2.1
pkgrel=2
pkgdesc='DVD authoring application for the creation of professional-looking DVDs'
arch=('loong64' 'x86_64')
url='https://www.dvdstyler.org/'
license=('GPL2')
depends=('cdrtools' 'dvdauthor' 'dvd+rw-tools' 'ffmpeg4.4' 'wxsvg')
makedepends=('docbook-xsl' 'xmlto' 'zip' 'ffmpeg')
source=("https://downloads.sourceforge.net/$pkgname/DVDStyler-$pkgver.tar.bz2"
        'dvdstyler.appdata.xml')
sha256sums=('0bb3348739f4c93097454b814ecb3a58f6bace8f030f41619a9feeafb4747558'
            '7c0abb349664e9a179e68feb2c614c4f9f5480b7fcd74040d043864b80cecd4a')

prepare() {
  cd DVDStyler-$pkgver
  sed -i 's|/pixmaps|/icons/hicolor/48x48/apps|' data/Makefile.{am,in}
}

build() {
  cd DVDStyler-$pkgver
  export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
  ./configure --prefix=/usr
  make
}

package() {
  cd DVDStyler-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}
